/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package inscripciones.modelo;

import java.io.Serializable;
import java.util.List;
import javax.net.ssl.SSLEngineResult.Status;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

/**
 *
 * @author Dianita
 */
@Entity
public class Abono implements Serializable {

    @Id
    @GeneratedValue(strategy = GenerationType.AUTO)
    private Integer id;
    private Double valor;
    private String nro;
    @ManyToOne
    private Pago forma;
     @Enumerated(EnumType.STRING)
    private Enumtipo enumtipes;


    public String getNro() {
        return nro;
    }

    public void setNro(String nro) {
        this.nro = nro;
    }

    public Double getValor() {
        return valor;
    }

    public void setValor(Double valor) {
        this.valor = valor;
    }

    public Pago getForma() {
        return forma;
    }

    public void setForma(Pago forma) {
        this.forma = forma;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
   
    public Enumtipo getEnumtipes() {
        return enumtipes;
    }

    public void setEnumtipes(Enumtipo enumtipes) {
        this.enumtipes = enumtipes;
    }

    public enum Enumtipo {

        EFECTIVO, COMPROBANTE;

        
        @Override
        public String toString() {
            switch (this) {
                case EFECTIVO:
                    return "EFECTIVO";
                case COMPROBANTE:
                    return "COMPROBANTE";
                default:
                    throw new IllegalArgumentException();
            }
        }
    }

    @Override
    public String toString() {
        return "Abono{" + "valor=" + valor + ", enumtipes=" + enumtipes + '}';
    }
    
   
}
